package com.example.goods.dao;

import com.example.goods.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper {
    int deleteByPrimaryKey(Long goodId);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Long goodId);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    List<Goods> selectGoodList();

    List<Goods> selectPaginationGoodList(@Param("offset") int offset,@Param("limit") int limit);

    int selectGoodListCount();

    List<Goods> selectCollectGoodList();

    List<Goods> selectCollectPaginationGoodList(@Param("offset")int offset,@Param("limit") int limit);

    int selectCollectGoodListCount();

    List<Goods> selectGoodsListPage(@Param("offset")int offset,@Param("limit") int limit);

    int selectGoodsPageCount();

}